


import Vue from "../node_modules/vue/dist/vue"
import VueRouter from "../node_modules/vue-router/dist/vue-router"
import loginForm from "./js/loginForm.js"
import registerForm from "./js/registerForm.js"

import './css/main.css'

//路由在模块化使用时要额外声明

Vue.use(VueRouter)

// 创建VueRouter对象
const yun9_router = new VueRouter({
    routes:[ // 编写多个路由规则
        {
            path:"/login", // 请求路径
            component:loginForm // 组件名称
        },
        {
            path:"/register",
            component:registerForm
        },
    ]
})


var vm = new Vue({
        el:"#app",
        components:{
            loginForm,
            registerForm
        },
        router:yun9_router
    })